package main

import (
	"runtime"

	"github.com/Re-volution/sizestruct"
)

const (
	udpServerListenPort int = 9002
	tcpServerListenPort int = 8102

	maxProcessKernel int = 2
)

func main() {
	initSys()
	initPara()

	go udpServer(udpServerListenPort)
	tcpServer(tcpServerListenPort)
}

func initSys() {
	runtime.GOMAXPROCS(maxProcessKernel)
}

func initPara() {
	p := ProtoHeadType{}
	protoHeadSize = sizestruct.SizeStruct(p)
	m := MediaHeadType{}
	mediaHeadSize = sizestruct.SizeStruct(m)

}
